﻿using Framework.Resource;
using Game.Lua.Base;

using IngameDebugConsole;
using TMPro;

namespace Framework.Procedure
{

    public class ProcedureConfigInit :ProcedureBase
    {
        public override void Enter(IProcedureOwner procedureOwner)
        {
            base.Enter(procedureOwner);
            // DebugLogManager.Instance.HideLogWindow();
            // DebugLogManager.Instance.PopupEnabled = false;
            
            // GameEntry.GetComponent<LuaManager>().Test();
            SetFont();
            LoadLua();
        }

        void SetFont()
        {
            UIFormLogic.font= GameEntry.GetComponent<ResourceManager>().LoadAssetSync<TMP_FontAsset>("Assets/Game/Fonts/xianglifang-Regular SDF.asset");
        }

        void LoadLua()
        {
            GameEntry.GetComponent<LuaManager>().LoadMainScripts();
        }
        
    }

}